package com.aspose.cells;

class zye {
   static Object[][] a(Object[][] var0) {
      Object[][] var1 = new Object[var0.length][];

      for(int var2 = 0; var2 < var0.length; ++var2) {
         if (var0[var2] != null) {
            var1[var2] = new Object[var0[var2].length];

            for(int var3 = 0; var3 < var0[var2].length; ++var3) {
               var1[var2][var3] = var0[var2][var3];
            }
         }
      }

      return var1;
   }

   private static void a(Object[][] var0, Object[][] var1) {
      int var2;
      if (var0[0].length > var1[0].length) {
         if (var1[0].length == 1) {
            var2 = var0[0].length;
         } else {
            var2 = var1[0].length;
         }
      } else if (var0[0].length < var1[0].length) {
         if (var0[0].length == 1) {
            var2 = var1[0].length;
         } else {
            var2 = var0[0].length;
         }
      } else {
         var2 = var0[0].length;
      }

      Object[] var4 = (Object[])((Object[])com.aspose.cells.b.a.za.a((Object[])var0[0], 0));
      Object[] var5 = (Object[])((Object[])com.aspose.cells.b.a.za.a((Object[])var1[0], 0));
      int var3;
      if (var4.length > var5.length) {
         if (var5.length == 1) {
            var3 = var4.length;
         } else {
            var3 = var5.length;
         }
      } else if (var4.length < var5.length) {
         if (var4.length == 1) {
            var3 = var5.length;
         } else {
            var3 = var4.length;
         }
      } else {
         var3 = var4.length;
      }

      var0[0] = a(var0[0], var2, var3);
      var1[0] = a(var1[0], var2, var3);
   }

   private static Object[] a(Object[] var0, int var1, int var2) {
      Object[] var3;
      if (var0.length == var1) {
         var3 = (Object[])((Object[])com.aspose.cells.b.a.za.a((Object[])var0, 0));
         if (var3.length == var2) {
            return var0;
         }
      }

      Object[] var5 = new Object[var1];
      boolean var6 = false;
      var3 = (Object[])((Object[])com.aspose.cells.b.a.za.a((Object[])var0, 0));
      if (var3.length == 1) {
         var6 = true;
      }

      Object[] var4;
      int var7;
      if (var0.length == 1) {
         var4 = new Object[var2];
         if (var6) {
            for(var7 = 0; var7 < var2; ++var7) {
               var4[var7] = com.aspose.cells.b.a.za.a((Object[])var3, 0);
            }
         } else {
            var3 = (Object[])((Object[])com.aspose.cells.b.a.za.a((Object[])var0, 0));
            System.arraycopy(var3, 0, var4, 0, var2);
         }

         for(var7 = 0; var7 < var1; ++var7) {
            var5[var7] = var4;
         }
      } else {
         for(var7 = 0; var7 < var1; ++var7) {
            var4 = new Object[var2];
            var3 = (Object[])((Object[])com.aspose.cells.b.a.za.a(var0, var7));
            if (var6) {
               for(int var8 = 0; var8 < var2; ++var8) {
                  var4[var8] = com.aspose.cells.b.a.za.a((Object[])var3, 0);
               }
            } else {
               System.arraycopy(var3, 0, var4, 0, var2);
            }

            var5[var7] = var4;
         }
      }

      return var5;
   }

   static void a(Object[] var0, Object[] var1) {
      if (var0[0] instanceof Object[][]) {
         var0[0] = a((Object[][])((Object[][])var0[0]));
      }

      if (var1[0] instanceof Object[][]) {
         var1[0] = a((Object[][])((Object[][])var1[0]));
      }

      Object[] var2 = null;
      Object[] var3 = null;
      Object[] var4;
      Object[] var5;
      Object[][] var6;
      Object[][] var7;
      int var8;
      if (com.aspose.cells.a.c.zc.a(var0[0])) {
         var2 = (Object[])((Object[])var0[0]);
         if (com.aspose.cells.a.c.zc.a(var1[0])) {
            var3 = (Object[])((Object[])var1[0]);
            var6 = new Object[][]{var2};
            var7 = new Object[][]{var3};
            a(var6, var7);
            var2 = var6[0];
            var3 = var7[0];
         } else {
            var3 = new Object[var2.length];
            var4 = (Object[])((Object[])com.aspose.cells.b.a.za.a((Object[])var2, 0));
            var5 = new Object[var4.length];

            for(var8 = 0; var8 < var5.length; ++var8) {
               com.aspose.cells.b.a.za.a(var5, var1[0], var8);
            }

            for(var8 = 0; var8 < var3.length; ++var8) {
               com.aspose.cells.b.a.za.a(var3, var5, var8);
            }

            var6 = new Object[][]{var2};
            var7 = new Object[][]{var3};
            a(var6, var7);
            var2 = var6[0];
            var3 = var7[0];
         }
      } else {
         var3 = (Object[])((Object[])var1[0]);
         var2 = new Object[var3.length];
         var5 = (Object[])((Object[])com.aspose.cells.b.a.za.a((Object[])var3, 0));

         for(var8 = 0; var8 < var2.length; ++var8) {
            var4 = new Object[var5.length];

            for(int var9 = 0; var9 < var4.length; ++var9) {
               com.aspose.cells.b.a.za.a(var4, var0[0], var9);
            }

            com.aspose.cells.b.a.za.a(var2, var4, var8);
         }

         var6 = new Object[][]{var2};
         var7 = new Object[][]{var3};
         a(var6, var7);
         var2 = var6[0];
         var3 = var7[0];
      }

      var0[0] = var2;
      var1[0] = var3;
   }
}
